package com.yutianran.springBoot.decorator

class Decorator {

    companion object {
        fun predicate(predicate: Function0<Boolean>, success: Function0<Unit>, error: Function0<Unit>) {
            if (predicate.invoke()) {
                success.invoke()
            } else {
                error.invoke()
            }
        }
    }

}
